﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace BioCyber_Infection
{
    class IntroScreen
    {
        SpriteFont titleFont;
        double x = 0;
        GameWindow window;
        Texture2D backgroundImage;

        public IntroScreen(GameWindow gameWindow, ContentManager content)
        {
            this.window = gameWindow;

            this.titleFont = content.Load<SpriteFont>("SpriteFont1");
            this.backgroundImage = content.Load<Texture2D>("background");
        }

        public void Update(GameTime gameTime, SpriteBatch spriteBatch)
        {
            x += 0.1;

            if (x >= 25)
            {
                Engine.currentState = Engine.gameState.MAINMENU;
            }
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(backgroundImage, new Rectangle(0, 0, window.ClientBounds.Width, window.ClientBounds.Height), Color.White);
            spriteBatch.DrawString(this.titleFont, "Numa galáxia tão tão distante...", new Vector2(100, 50), Color.White);
        }
    }
}
